import gl
import sys
print(sys.version)
print(gl.version())
gl.resetdefaults()

# Open background image from correct file path
gl.loadimage('MRIcroGL/Resources/standard/mni152.nii.gz')

# Turn off smoothing
gl.overlayloadsmooth(0)

# Glass brain settings
gl.shadername('Glass')
gl.shaderadjust('boundThresh', 0.35)
gl.shaderadjust('boundBrightness',0.8)
#gl.shaderadjust('colorTemp', 0.1)

# Load overlays from correct file path
gl.overlayload('er_cbma_C05_1k_clust.nii')

# Set overlay display parameters; 1 indicates 1st overlay
gl.colorname(1,"Grayscale")
#gl.colorname(2,"Grayscale")

#gl.minmax(1,0,10)
#gl.minmax(2,0,1)


# Overlay blending
# gl.overlayadditiveblending(1)

# Set the color bar options 
gl.colorbarposition(0)

# Set the background color
gl.backcolor(255,255,255)

# Change brain layer opacity 
gl.opacity(0,85)

# Shift the camera angle
gl.azimuthelevation(120, 0)

# Save the image 
#gl.savebmp('Fig3b.png')
